package ca.etsmtl.log720.tp3.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import ca.etsmtl.log720.tp3.dao.Infraction;
import ca.etsmtl.log720.tp3.dao.InfractionDAO;

@Service
public class InfractionServiceImpl implements InfractionService {

	@Autowired
    private InfractionDAO infractionDAO;
	
	@Transactional
	public void addInfraction(Infraction infraction) {
		infractionDAO.addInfraction(infraction);
	}

	@Transactional
	public List<Infraction> listInfraction() {
		return infractionDAO.listInfraction();
	}

}
